package com.pand.model.customer;

import com.pand.model.BaseObject;

import javax.persistence.*;
import java.util.Date;

/**
 * 
 * @ClassName: CustomerAccount
 * @Description: 个人客户账户
 *
 */
@Entity
@Table(name = "BIZ_CUSTOMER_ACCOUNT")
@SequenceGenerator(name = "SeqCustomerAccount", sequenceName = "SEQ_CUSTOMER_ACCOUNT", allocationSize = 1)
public class CustomerAccount extends BaseObject {

	/**
	 * @Fields serialVersionUID :
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 账户id
	 */
	private Long accountId;

	/**
	 * 客户id
	 */
	private Long customerId;

	/**
	 * 账户类型
	 */
	private String accountType;

	/**
	 * 账户总金额
	 */
	private String accountBalance;

	/**
	 * 账户额度备份
	 */
	private Double accountBalanceBak;

	/**
	 * 冻结金额
	 */
	private String frozenAmount;

	/**
	 * 冻结金额备份
	 */
	private Double frozenAmountBak;

	/**
	 * 最后操作记录ID
	 */
	private Long lastJournalId;

	/**
	 * 日记账余额
	 */
	private String lastJournalAmount;

	/**
	 * 最近日记账金额备份
	 */
	private Double lastJournalAmountBak;

	/**
	 * 最后交易日期
	 */
	private Date lastBillDate;

	/**
	 * 最后修改人
	 */
	private String modifier;

	/**
	 * 最后修改人
	 */
	private Date updateTime;

	/**
	 * 是否有效
	 */
	private Boolean isValid;

	/**
	 * 是否删除
	 */
	private Boolean isDelete;

	/**
	 * 客户类型
	 */
	private String customerType;

	/**
	 * 账户类型名称
	 */
	private String accountTypeName;

	/**
	 * 客户类型名称
	 */
	private String customerTypeName;

	@Id
	@GeneratedValue(generator = "SeqCustomerAccount")
	@Column(name = "ID")
	public Long getAccountId() {
		return accountId;
	}

	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}

	@Column(name = "CUSTOMER_ID")
	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	@Column(name = "ACCOUNT_TYPE")
	public String getAccountType() {
		return accountType;
	}

	public void setAccountType(String accountType) {
		this.accountType = accountType;
	}

	@Column(name = "ACCOUNT_BALANCE")
	public String getAccountBalance() {
		return accountBalance;
	}

	public void setAccountBalance(String accountBalance) {
		this.accountBalance = accountBalance;
	}

	@Column(name = "LAST_JOURNAL_ID")
	public Long getLastJournalId() {
		return lastJournalId;
	}

	public void setLastJournalId(Long lastJournalId) {
		this.lastJournalId = lastJournalId;
	}

	@Column(name = "LAST_JOURNAL_AMOUNT")
	public String getLastJournalAmount() {
		return lastJournalAmount;
	}

	public void setLastJournalAmount(String lastJournalAmount) {
		this.lastJournalAmount = lastJournalAmount;
	}

	@Column(name = "LAST_BILL_DATE")
	public Date getLastBillDate() {
		return lastBillDate;
	}

	public void setLastBillDate(Date lastBillDate) {
		this.lastBillDate = lastBillDate;
	}

	@Column(name = "MODIFIER")
	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	@Column(name = "UPDATE_TIME")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "IS_VALID")
	public Boolean getIsValid() {
		return isValid;
	}

	public void setIsValid(Boolean isValid) {
		this.isValid = isValid;
	}

	@Column(name = "IS_DELETE")
	public Boolean getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "CUSTOMER_TYPE")
	public String getCustomerType() {
		return customerType;
	}

	public void setCustomerType(String customerType) {
		this.customerType = customerType;
	}

	@Transient
	public String getAccountTypeName() {
		return accountTypeName;
	}

	@Transient
	public String getCustomerTypeName() {
		return customerTypeName;
	}

	public void setAccountTypeName(String accountTypeName) {
		this.accountTypeName = accountTypeName;
	}

	public void setCustomerTypeName(String customerTypeName) {
		this.customerTypeName = customerTypeName;
	}

	@Column(name = "FROZEN_AMOUNT")
	public String getFrozenAmount() {
		return frozenAmount;
	}

	public void setFrozenAmount(String frozenAmount) {
		this.frozenAmount = frozenAmount;
	}

	@Column(name = "ACCOUNT_BALANCE_BAK")
	public Double getAccountBalanceBak() {
		return accountBalanceBak;
	}

	public void setAccountBalanceBak(Double accountBalanceBak) {
		this.accountBalanceBak = accountBalanceBak;
	}

	@Column(name = "FROZEN_AMOUNT_BAK")
	public Double getFrozenAmountBak() {
		return frozenAmountBak;
	}

	public void setFrozenAmountBak(Double frozenAmountBak) {
		this.frozenAmountBak = frozenAmountBak;
	}

	@Column(name = "LAST_JOURNAL_AMOUNT_BAK")
	public Double getLastJournalAmountBak() {
		return lastJournalAmountBak;
	}

	public void setLastJournalAmountBak(Double lastJournalAmountBak) {
		this.lastJournalAmountBak = lastJournalAmountBak;
	}

}
